package com.ymk.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.ymk.base.BaseVO;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author 胡泽鑫
 * @since 2023-06-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("orders")
public class Orders extends BaseVO {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商户id
     */
    @TableField("mch_id")
    private Integer mchId;

    /**
     * 桌号
     */
    @TableField("desk_id")
    private Integer deskId;

    /**
     * 订单id
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 骑手id
     */
    @TableField("deliver_id")
    private Integer deliverId;

    /**
     * id
     */
    @TableField("member_id")
    private Integer memberId;

    /**
     * 金额
     */
    @TableField("orders_amount")
    private BigDecimal ordersAmount;

    /**
     * 分账金额
     */
    @TableField("superior_amount")
    private BigDecimal superiorAmount;

    /**
     * 盈利金额
     */
    @TableField("profit_amount")
    private BigDecimal profitAmount;

    /**
     * 子订单数量
     */
    @TableField("sub_order_count")
    private Integer subOrderCount;

    /**
     * 商品数量
     */
    @TableField("goods_count")
    private Integer goodsCount;

    /**
     * 支付id
     */
    @TableField("payment_id")
    private Integer paymentId;

    /**
     * 支付类型
     */
    @TableField("pay_type")
    private String payType;

    /**
     * 实付金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;

    /**
     * 关闭时间
     */
    @TableField("close_date")
    private Date closeDate;

    /**
     * 关闭原因
     */
    @TableField("close_reason")
    private String closeReason;

    /**
     * 是否发单据 0不发 1发送
     */
    @TableField("send_bill")
    private Integer sendBill;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 是否是首次下单
     */
    @TableField("is_first")
    private Integer isFirst;

    /**
     * 状态
     */
    @TableField("status")
    private String status;


}
